Traffic metering is the process of measuring temporal properties, such as rate, delay, jitter, etc., of a stream of data packets processed by a network device. The result of a metering process may be qualitative or quantitative. With quantitative metering, one or more measured property values are returned by the meter. With qualitative metering, measured values are effectively compared with a traffic profile defined in terms of property thresholds to determine, on a packet-by-packet basis, whether or not the traffic is within the profile. If the traffic is within the profile when a given packet is processed by the meter, i.e. the (or each) measured property value is below the appropriate threshold, then the packet is categorized as in profile, or “IN” for short. Otherwise the packet is categorized as out of profile, or “OUT” for short. Metering is usually combined with marking of data packets. Marking is the process of setting information in the packet, typically header information, according to the result of the metering process, e.g. to indicate whether a packet is IN or OUT. This information might be used in deciding how packets are processed subsequently, whether locally in the device containing the meter or elsewhere in the network, and/or in monitoring or controlling some broader aspect of device or network operation.
A common qualitative metering technique is based on the use of token buckets. Token bucket metering is known in two basic variants: strict conformance and loose conformance. In both cases the meter includes a token counter, or “token bucket”, such that the token count TC corresponds to the number of tokens in the bucket. Each token represents a defined unit of data, such as a bit or byte. Tokens are continually added to the bucket in that the token count is incremented at a defined rate known as the Committed Information Rate (CIR), subject to a specified upper limit on the token count known as the Committed Burst Size (CBS). When a data packet is received by the meter, the packet is categorized as either IN or OUT in dependence on the current token count TC, but the decision process here differs for strict and loose conformance meters. In a strict conformance meter, on arrival of a packet of length L (measured in tokens), if TC≧L then the packet is categorized as IN. The token count is then decremented by L tokens, i.e. L tokens are subtracted from the token count. On the other hand, if TC<L, then the packet is categorized as OUT and the token count is not decremented. Thus, with strict conformance, a packet will only be designated IN if there are sufficient tokens in the bucket for a packet of that size. In contrast, in a loose conformance meter, an arriving packet of length L will be categorized as IN if TC>0. TC is then decremented by L and may therefore become negative. If TC≦0 then the packet is categorized as OUT and the token count is not decremented. Thus, loose conformance meters effectively allow packets to borrow tokens from future token allocations. In particular, if Lmax is the maximum length of data packets processed by the meter, up to (Lmax−1) tokens can be borrowed from future allocations.
Both strict and loose conformance token bucket meters have limitations in the presence of multimodal packet length distributions, i.e. where the metered packet stream contains packets having a plurality of different packet lengths. Particular limitations are indicated in the discussion of strict vs. loose conformance token bucket metering in IETF RFC 3290, “An Informal Management Model for Diffserv Routers”, Bernet et al., Appendix A, pp. 49 to 54, May 2002. For example, because strict conformance meters only categorize a packet as IN if TC≧L, the greater the packet length L the less likely it is that a packet will be IN. These meters therefore discriminate against larger packets in a multi-length packet environment, the disadvantage increasing with increasing packet length. With loose conformance meters, since a packet is designated IN if TC>0, a packet of any length can borrow tokens from future allocations provided there is at least one token in the bucket. This implies greater fairness among packets of different lengths, although smaller packets are prejudiced compared to the strict conformance system. This is because larger packets are more likely to leave the token count negative by borrowing from future allocations. With a negative token count, even a small packet, which might have been accepted in the absence of borrowing, will be categorized as OUT. Another problem is that of jitter. Jitter occurs because incrementing of the token count is capped by the maximum token count CBS. If packet arrival rates are low over a given period then less tokens overall will be added to the bucket since the increments stop when TC=CBS. When packet rates subsequently increase, there may be insufficient tokens to accept all packets when there might have been enough if the packets had arrived at an even rate. Jitter tends to accumulate over multiple hops in a network, and has a particularly negative impact on real-time signals such as voice and video communications where packet loss is most critical. The jitter effect can be particularly pronounced in loose conformance metering of multi-length packet streams due to the borrowing of tokens by larger packets. As explained above, borrowing by large packets tends to prejudice acceptance of smaller packets, thus exacerbating jitter for smaller packets. Jitter is generally more critical for the smaller packets in a multi-length environment since real-time applications typically use small packet sizes.
Certain problems associated with the differentiated treatment of multimodal packet length distributions can be addressed by using separate token buckets for different packet-lengths (see for example “A TCP-Friendly Traffic Marker for IP Differentiated Services”, Feroz et al., IWQoS '2000, Pittsburg Pa., June 2000, pp. 35 to 48, section 5.3 (Simulations with per-flow traffic conditioning)). The token buckets can be specified with different CIRs for instance, setting the CIR for smaller packets to a higher value than that for larger packets. However, such an approach requires a large amount of metering state and complicates the configuration of meters.